import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import Antd from 'ant-design-vue';
import 'element-ui/lib/theme-chalk/index.css'
import 'ant-design-vue/dist/antd.css';
import VueCookies from 'vue-cookies'
import * as echarts from 'echarts'
// import echarts from 'echarts'
Vue.prototype.$echarts = echarts;

import moment from 'moment'
Vue.prototype.$moment = moment

// 如果引入的是 安装某个组件，不用写路径，如果是自己定义的组件必须要写路径 @/   ./ 
import router from '@/router'

Vue.use(ElementUI)
    .use(Antd)
    .use(VueCookies)
    // .use(echarts)
//订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:已完成 6:已关闭
Vue.filter('statusTran',function(val){
  switch(val){
    case 1 : return "待付款"
    case 2 : return "待发货"
    case 3 : return "待收货"
    case 4 : return "待评价"
    case 5 : return "已完成"
    case 6 : return "已关闭"
  }
})
Vue.filter('money',function(val){
  return "￥" + " " + val
})
Vue.filter('img',function(val){
  return "https://fzlbkt.oss-cn-hangzhou.aliyuncs.com/exampledir/" + val
})

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
